home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 September / GSSH0904CD1.iso / RiseofNations / RedFront / RedFront.exe / Red Front / Red Front - 01 - Barbarossa.bhs < prev    next >
Text File  |  2004-01-03  |  13KB  |  429 lines

  1. /* Red Front
  2.    Barbarossa
  3.    
  4.    These events will control the Barbarossa scenario for the Red Front campaign.
  5.   
  6.    Campaign By: Kevin 'DarthVeda' Chulski
  7.    Contact: darthveda@hotmail.com
  8.    Please email any questions/suggestions/comments that you have!   
  9. */
  10.  
  11. scenario
  12. {
  13.  
  14.   set_nation_name("Russians", $S("Red Army"));
  15.   set_nation_name("Romans", $S("Germans"));
  16.   
  17.   // initialize variables
  18.   
  19.   static int hey_you_guys = 0;
  20.   static int min = 20;
  21.   static int sec = 0;
  22.   
  23.   
  24. labels {
  25.   //Add any constant labels here in a comma separated list.
  26.   
  27. }
  28.  
  29. run_once {
  30.   //Insert commands that should be executed only once when the script is loaded here.
  31.   
  32.   //disable weird things
  33.   
  34.   disable_type("Helicopter");
  35.   disable_type("Nuclear Missile");
  36.   disable_type("Spy");
  37.   disable_type("Citizen");
  38.   
  39.   disable_tech(3, "Allegiance");
  40.   disable_tech(3, "Computerization");
  41.   set_music_mood("losing", true);
  42.   
  43.   // disable wonders
  44.   
  45.   disable_type( "Pyramids" );
  46.   disable_type( "Colossus" );
  47.   disable_type( "Terra Cotta Army" );
  48.   disable_type( "Colosseum" );
  49.   disable_type( "Temple of Tikal" );
  50.   disable_type( "Porcelain Tower" );
  51.   disable_type( "Angkor Wat" );
  52.   disable_type( "Versailles" );
  53.   disable_type( "Statue of Liberty" );
  54.   disable_type( "Kremlin" );
  55.   disable_type( "Taj Mahal" );
  56.   disable_type( "Eiffel Tower" );
  57.   disable_type( "Supercollider" );
  58.   disable_type( "Space Program" );
  59.   
  60.   // disable certain buildings and guys
  61.   
  62.   disable_type( "Fishermen" );
  63.   disable_type( "Scholar" );
  64.   disable_type( "Small City" );
  65.   disable_type( "General" );
  66.   disable_type( "Market" );
  67.   disable_type( "University" );
  68.   disable_type( "Library" );
  69.   
  70.   // disable ships
  71.   
  72.   disable_type("Submarine");
  73.   disable_type("Dreadnought");
  74.   disable_type("Destroyer");
  75.   
  76.   //Gain Upgrades 
  77.   gain_upgrade(1, "Tactics");//Gain research tactics
  78.   gain_upgrade(1, "Operations");//Gain research operations
  79.   gain_upgrade(1, "Strategy");//Gain research strategy
  80.   
  81.   // set timers
  82.     
  83.   // disable triggers
  84.   
  85.   disable_trigger( "firstwave" );
  86.   disable_trigger( "secondwave" );
  87.   disable_trigger( "nthwave" );
  88.   
  89.   // blurb or cinematic
  90.   
  91.     
  92. }
  93.  
  94. //Main script body.
  95. //Add triggers and other commands to be executed each game frame here.
  96. //Use Edit->Insert Trigger Function to select from the list of available functions
  97. //Use Edit->Insert Trigger Block to add a blank trigger block.
  98. //See ./scenario/sample_script.bhs for additional documentation
  99.  
  100.   trigger the_reminder ( timer_expired( "reminder" ) && hey_you_guys == 0 )
  101.   {
  102.     popup_dialog( "General, look around for our soldiers (BLUE) stranded in the wilderness.  They may need your leadership." );
  103.   }
  104.  
  105.   trigger opening_scene ( )
  106.   {
  107.     set_msg_time(30);//Sets message time to 30 seconds
  108.     scrolling_lock();//Locks scrolling
  109.     zooming_lock();//Locks zooming
  110.     hotkey_selection_disable();//disables hotkey selection
  111.     ui_hide();//Hides the UI
  112.     mouse_selection_disable();//disables mouse selection
  113.     print_msg("June 22, 1941: In violation of their non-agression pact, the Germans launch the most massive land invasion in history across a 1000-mile front into the Soviet Union.  The battle for the Red Front has begun!" ); 
  114.   }
  115.  
  116.   trigger clear_intro ( city_captured_by( 1,2,"Bialystok" )) 
  117.   {
  118.     move_camera(48,82);//Moves camera to action scene
  119.     set_msg_time(6);//Resets message time to default
  120.     clear_msg();//clears text
  121.     scrolling_unlock();
  122.     zooming_unlock();
  123.     hotkey_selection_enable();
  124.     mouse_selection_enable();
  125.     ui_show();
  126.     popup_dialog( "There is only one option for you comrade general: advance to the fort in the southeast and attempt to organize a defense from there.  And general, you must survive." );
  127.     add_objective( "Find some way to the fort", "fort", "null.wav" );
  128.     add_objective( "General must survive", "generalsurvive", "null.wav" );
  129.     add_objective_text( "Time before German attack: 20:00", "supertime", "null.wav" );
  130.     set_timer( "reminder", 30 );
  131.     set_timer( "attacker", 1);
  132.   }
  133.  
  134.   trigger theys_a_coming ( timer_expired("attacker") )
  135.   {
  136.     if ( sec == 0 )
  137.     {
  138.       sec = 59;
  139.       min--;
  140.     }
  141.     else
  142.     {
  143.       sec--;
  144.     }
  145.     
  146.     if ( min <= 0 && sec <= 0 )
  147.     {
  148.       remove_objective( "supertime" );
  149.       popup_dialog( "The Germans are launching their attack, general. Defend against this attack general and kill at least 40 German units in the process." );
  150.       add_objective("Kill at least 40 German units","killem","null.wav");
  151.       add_objective("Current Tally: " + num_units_killed( 1 ), "killem2", "null.wav"); 
  152.       set_timer( "first_wave", 10 );
  153.       enable_trigger( "firstwave" );
  154.       enable_trigger( "counter" );
  155.     }
  156.     else
  157.     {
  158.       if ( sec >= 10 )
  159.       {
  160.         change_objective_text( "supertime", "Time before German attack: " + min + ":" + sec + "" );
  161.       }
  162.       else
  163.       {
  164.         change_objective_text( "supertime", "Time before German attack: " + min + ":0" + sec + "" );
  165.       }
  166.       set_timer( "attacker", 1 );
  167.       enable_trigger( "theys_a_coming" );
  168.     }
  169.   }
  170.  
  171.   trigger you_guys_are_great ( hey_you_guys > 0 )
  172.   {
  173.     popup_dialog( "It looks as if there are many soldiers stranded between us and the fort.  Collect them general and lead them to victory.  However, it may not be wise to engage the Germans at this point; attempt to hide if you see them." );
  174.     popup_dialog( "NEW OPTIONAL OBJECTIVE: Gather as many soldiers as possible." );
  175.     add_objective( "OPTIONAL: Gather as many soldiers as possible.", "getguys", "null.wav" );  
  176.   }
  177.   
  178.   trigger guy_0 ( object_type_near(1,"General",1,86,91,2) )
  179.   {
  180.     switch_teams(1,3,0);
  181.     ping(1,3,86,91);
  182.  
  183.     hey_you_guys++;
  184.   }
  185.   
  186.   trigger guy_1 ( object_type_near(1,"General",1,57,10,3) )
  187.   {
  188.     switch_teams(1,3,3);
  189.     ping(1,3,57,10);
  190.     
  191.     hey_you_guys++;
  192.   }
  193.   
  194.   trigger guy_2 ( object_type_near(1,"General",1,130,3,2) )
  195.   {
  196.     switch_teams(1,3,4);
  197.     switch_teams(1,3,7);
  198.     ping(1,3,130,3);
  199.     create_unit(2,173,12,"Infantry",2);
  200.     
  201.     hey_you_guys++;
  202.   }
  203.   
  204.   trigger guy_3 ( object_type_near(1,"General",1,212,27,2) )
  205.   {
  206.     switch_teams(1,3,8);
  207.     switch_teams(1,3,9);
  208.     ping(1,3,212,27);
  209.     
  210.     hey_you_guys++;
  211.   }
  212.   
  213.   trigger docktime ( object_type_near(1,"General",1,138,86,10) )
  214.   {
  215.     switch_teams(1,3,2003);
  216.     popup_dialog( "This dock looks like it was abandoned by fleeing civilians.  It will enable our troops to cross the river." );
  217.     move_camera(145,96);
  218.         
  219.     hey_you_guys++;
  220.   }
  221.   
  222.   trigger guy_4 ( object_type_near(1,"General",1,144,133,2) )
  223.   {
  224.     switch_teams(1,3,13);
  225.     switch_teams(1,3,16);
  226.     switch_teams(1,3,2007);
  227.     ping(1,3,144,133);
  228.     
  229.     hey_you_guys++;
  230.   }
  231.   
  232.   trigger guy_5 ( object_type_near(1,"General",1,192,100,2) )
  233.   {
  234.     switch_teams(1,3,26);
  235.     ping(1,3,192,100);
  236.     
  237.     hey_you_guys++;
  238.   }
  239.   
  240.   trigger guy_6 ( object_type_near(1,"General",1,235,99,2) )
  241.   {
  242.     switch_teams(1,3,27);
  243.     ping(1,3,235,99);
  244.     
  245.     hey_you_guys++;
  246.   }
  247.   
  248.   trigger guy_7 ( object_type_near(1,"General",1,228,129,2) )
  249.   {
  250.     switch_teams(1,3,30);
  251.     switch_teams(1,3,33);
  252.     ping(1,3,228,129);
  253.     
  254.     hey_you_guys++;
  255.   }
  256.   
  257.   trigger guy_8 ( object_type_near(1,"General",1,221,172,2) )
  258.   {
  259.     switch_teams(1,3,39);
  260.     switch_teams(1,3,36);
  261.     ping(1,3,221,172);
  262.     
  263.     hey_you_guys++;
  264.   }
  265.   
  266.   trigger guy_9 ( object_type_near(1,"General",1,168,211,2) )
  267.   {
  268.     switch_teams(1,3,21);
  269.     switch_teams(1,3,19);
  270.     switch_teams(1,3,20);
  271.     ping(1,3,168,211);
  272.     
  273.     hey_you_guys++;
  274.   }
  275.   
  276.   trigger guy_10 ( object_type_near(1,"General",1,108,228,2) )
  277.   {
  278.     switch_teams(1,3,23);
  279.     ping(1,3,108,228);
  280.     
  281.     hey_you_guys++;
  282.   }
  283.   
  284.   trigger guy_11 ( object_type_near(1,"General",1,30,137,2) )
  285.   {
  286.     switch_teams(1,3,50);
  287.     ping(1,3,30,137);
  288.     
  289.     hey_you_guys++;
  290.   }
  291.   
  292.   trigger guy_12 ( object_type_near(1,"General",1,119,198,2) )
  293.   {
  294.     switch_teams(1,3,22);
  295.     ping(1,3,119,198);
  296.     
  297.     hey_you_guys++;
  298.   }
  299.   
  300.   trigger guy_13 ( object_type_near(1,"General",1,33,190,2) )
  301.   {
  302.     switch_teams(1,3,47);
  303.     ping(1,3,33,190);
  304.     
  305.     hey_you_guys++;
  306.   }
  307.   
  308.   trigger guy_14 ( object_type_near(1,"General",1,9,125,2) )
  309.   {
  310.     switch_teams(1,3,51);
  311.     ping(1,3,9,125);
  312.     
  313.     hey_you_guys++;
  314.   }
  315.   
  316.   trigger guy_15 ( object_type_near(1,"General",1,35,222,2) )
  317.   {
  318.     switch_teams(1,3,46);
  319.     ping(1,3,35,222);
  320.     
  321.     hey_you_guys++;
  322.   }
  323.   
  324.   trigger guy_16 ( object_type_near(1,"General",1,13,225,2) )
  325.   {
  326.     switch_teams(1,3,40);
  327.     switch_teams(1,3,43);
  328.     ping(1,3,13,225);
  329.     
  330.     hey_you_guys++;
  331.   }
  332.   
  333.   trigger gotten_all_guys ( hey_you_guys >= 18 )
  334.   {
  335.     objective_complete( "getguys" );
  336.     popup_dialog( "Comrade general, you have found the last of the soldiers.  Get to the fortress and prepare the defense." );
  337.   }
  338.   
  339.   // General arrives
  340.   
  341.   trigger general_arrives ( object_type_near(1,"General",1,234,234,20) )
  342.   {
  343.     objective_complete( "fort" );
  344.     create_unit(1,221,221,"Riflemen",3);
  345.     create_unit(1,221,221,"Artillery",1);
  346.     popup_dialog( "Your safe return has rallied troops to your position.  However, the Germans are not yet through with us." );
  347.     if ( hey_you_guys < 18 )
  348.     {
  349.       popup_dialog( "We still have some soldiers unaccounted for.  However, we cannot spare the time to find them.  Make do with what you have, comrade general." );
  350.       remove_objective( "getguys" );
  351.     }
  352.     if ( is_trigger_enabled( "theys_a_coming" ) )
  353.     {
  354.       popup_dialog( "Scouts report the Germans are planning on attacking our position soon. Defend against this attack general and kill at least 40 German units in the process." );
  355.       add_objective("Kill at least 40 German units","killem","null.wav");
  356.       add_objective("Current Tally: " + num_units_killed( 1 ), "killem2", "null.wav"); 
  357.       remove_objective( "supertime" );  // remove time keeper objective
  358.       set_timer( "first_wave", 10 );
  359.       disable_trigger( "theys_a_coming" ); // disable time keeper
  360.       enable_trigger( "firstwave" );
  361.       enable_trigger( "counter" );
  362.     }
  363.   }
  364.   
  365.   trigger counter ( true )
  366.   {
  367.     change_objective_text( "killem2", "Current Tally: " + num_units_killed( 1 ) );
  368.     enable_trigger( "counter" );
  369.   }
  370.   
  371.   trigger firstwave ( timer_expired( "first_wave" ) )
  372.   {
  373.     create_unit(2,126,104,"Infantry",5);
  374.     group_attack_to_order(2,221,220);
  375.     create_unit(2,126,104,"Tank",1);
  376.     group_attack_to_order(2,221,220);
  377.     create_unit(2,126,104,"Bomber",1);
  378.     group_attack_to_order(2,221,220);
  379.     create_unit(2,126,104,"Heavy Machine Gun",1);
  380.     group_attack_to_order(2,221,220);     
  381.     set_timer( "second_wave", 30 );
  382.     enable_trigger( "secondwave" );
  383.   }
  384.   
  385.   trigger secondwave( timer_expired( "second_wave" ) )
  386.   {
  387.     create_unit(2,126,104,"Infantry",10);
  388.     group_attack_to_order(2,221,220);
  389.     create_unit(2,126,104,"Armored Scout Car",3);
  390.     group_attack_to_order(2,221,220);
  391.     create_unit(2,126,104,"Bomber",1);
  392.     group_attack_to_order(2,221,220);
  393.     create_unit(2,126,104,"Heavy Machine Gun",1);
  394.     group_attack_to_order(2,221,220);
  395.     set_timer( "nth_wave", 30 );
  396.     enable_trigger( "nthwave" );
  397.   }
  398.   
  399.   trigger nthwave ( timer_expired( "nth_wave" ) )
  400.   {
  401.     create_unit(2,126,104,"Infantry",5);
  402.     group_attack_to_order(2,221,220);
  403.     create_unit(2,126,104,"Tank",1);
  404.     group_attack_to_order(2,221,220);
  405.     create_unit(2,126,104,"Howitzer",1);
  406.     group_attack_to_order(2,221,220);
  407.     create_unit(2,126,104,"Heavy Machine Gun",1);
  408.     group_attack_to_order(2,221,220);
  409.     set_timer( "nth_wave", 20);
  410.     enable_trigger( "nthwave" );
  411.   }
  412.   
  413.   trigger you_win ( num_units_killed( 1 ) >= 40 )
  414.   {
  415.     objective_complete( "generalsurvive" );
  416.     objective_complete( "killem" );
  417.     objective_complete( "killem2" );
  418.     popup_dialog( "Your defense of the Bialystok fortress will be an inspiration to all of the Motherland, comrade general! Even now, our great leader Stalin reads about your exploits.  Excellent Work!" );
  419.     popup_dialog( "You are now ready for the second part of this campaign.  Please load the next scenario in the Red Front sequence." );
  420.     victory( 1 );
  421.   }
  422.   
  423.   trigger you_lose ( unit_type_killed( 1,"General" ) )
  424.   {
  425.     popup_dialog( "Your death is a major blow for the effort.  Perhaps it was inevitable..." );
  426.     defeat( 1 );
  427.   }
  428.  
  429. }